package com.yantu.controller.admin;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yantu.bean.User;
import com.yantu.bean.UserEventLog;
import com.yantu.mapper.UserEventLogMapper;
import com.yantu.util.Result;
import com.yantu.view.admin.AdminPageView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 综合实训课程设计
 * @since 2022-08-15
 */
@RestController
@RequestMapping("/admin")
@Api("管理端用户日志接口")
public class AdminUserEventLogController {
    @Autowired
    UserEventLogMapper userEventLogMapper;


    public void adminLog(String msg){
        UserEventLog userEventLog=new UserEventLog();
        userEventLog.setUserId(2);
        userEventLog.setUserName("admin");
        userEventLog.setRealName("管理员");
        userEventLog.setCreateTime(new Date());
        userEventLog.setContent(msg);
        userEventLogMapper.insert(userEventLog);
    }
}

